/*
* @Author: steven.wang
* @Date:   2019-05-08 16:03:05
* @Last Modified by:   steven.wang
* @Last Modified time: 2019-05-20 12:07:01
*/
const express = require('express');
const router = express.Router();
const Joi = require('@hapi/joi');
const jwtMiddleware = require('../../middlewares/jwt');
const naviController = require('../../controllers/serve/navi');

// 获取网址列表
router.get('/navi', jwtMiddleware, naviController.list);
// 添加网址
router.post('/navi', jwtMiddleware, naviController.add);
// 更新网址
router.put('/navi', jwtMiddleware, naviController.update);
// 删除
router.delete('/navi', jwtMiddleware, naviController.delete);

// 获取网址分类列表
router.get('/naviCategory', jwtMiddleware, naviController.listCategory);
// 添加网址分类
router.post('/naviCategory', jwtMiddleware, naviController.addCategory);

module.exports = router;